package com.baiyue.controller;

import com.baomidou.mybatisplus.plugins.Page;
import com.baiyue.entity.Log;
import com.baiyue.model.log.LogDataRequest;
import com.baiyue.result.Result;
import com.baiyue.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 伍波
 * @date 2023/2/28 0028 0:08
 */
@RestController
@RequestMapping(value = "/api/log")
public class LogController {
    @Autowired
    private LogService logService;

    @PostMapping("/list")
    public Result<Page<Log>> getLogList(@RequestBody LogDataRequest request){
        return Result.success(logService.findAll(request));
    }
}
